<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ExtendJquery</title>
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<script type="text/javascript">
	$(function() {
		console.log($.toFixedString("ysh", 10, "0"));
	});
	
	(function($) {
		$.toFixedString = function(value, length, fill) {
			var result = value || "";
			fill = fill || "0";
			var padding = length - result.length;
			if (padding < 0) {
				result.substr(-padding);
			} else {
				for ( var i = 0; i < padding; i++) {
					result = fill + result; 
				}
			}
			return result;
		};	
	})(jQuery);
</script>
</head>
<body>
</body>
</html>